package com.dj.mingkong.portal.biz.controller.music.vo.request;

import jakarta.validation.constraints.*;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.URL;

import java.io.Serializable;
import java.util.List;

/**
 * 音乐人VO
 *
 * @author zenglonghui
 * @date: 2022/7/22 15:05
 */
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@Accessors(chain = true)
public class MusicianUpdateVo implements Serializable {
    /**
     * 主键
     */
    @NotNull(message = "Id can not be null")
    private Long id;

    /**
     * 艺名
     */
    @NotBlank(message = "stageName can not be blank")
    @Size(min = 2, max = 18, message = "stageName invalid")
    private String stageName;

    /**
     * 真实姓名
     */
    @NotBlank(message = "realName can not be blank")
    @Size(max = 18, message = "realName invalid")
    private String realName;

    /**
     * 性别 0未知 1男 2女
     */
    @Null(message = "Age must be null")
    @Max(value = 2, message = "sex invalid")
    @Min(value = 0, message = "sex invalid")
    @PositiveOrZero(message = "sex invalid")
    private Integer sex;

    /**
     * 年龄
     */
    @Null(message = "Age must be null")
    @Max(value = 100, message = "age invalid")
    @Min(value = 1, message = "age invalid")
    @PositiveOrZero(message = "age invalid")
    private Integer age;

    /**
     * 头像
     */
    @NotBlank(message = "avatarUrl can not be blank")
    @Size(min = 1, max = 230, message = "avatarUrl invalid")
    @URL(message = "avatarUrl invalid")
    private String avatarUrl;

    /**
     * 个人描述
     */
    @NotBlank(message = "description can not be blank")
    @Size(min = 10, max = 480, message = "description invalid")
    private String description;

    /**
     * 所在城市
     */
    @NotBlank(message = "city can not be blank")
    @Size(max = 20, message = "city invalid")
    private String city;

    /**
     * 作品试样
     */
    @NotBlank(message = "demoUrl can not be blank")
    @Size(max = 230, message = "demoUrl invalid")
    @URL(message = "demoUrl invalid")
    private String demoUrl;

    @NotEmpty(message = "styleIdList can not be Empty")
    @Size(min = 1, max = 10, message = "styleIdList invalid")
    private List<Long> styleIdList;

    @NotEmpty(message = "typeIdList can not be null")
    @Size(min = 1, max = 10, message = "typeIdList invalid")
    private List<Long> typeIdList;
}
